package com.kpmg.datalake.schedule.model;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 任务调度日志
 * </p>
 *
 * @author azhao6
 * @since 2018-08-09
 */
@TableName("SKD_JOB_LOG")
public class ScheduleJobLog implements Serializable {

    private static final long serialVersionUID = -1509165766154296165L;
    /**
     * 日志ID
     */
    @TableId(type = IdType.UUID)
    private String logId;
    /**
     * 任务ID
     */
    private String jobId;
    /**
     * 任务名称
     */
    private String jobName;
    /**
     * 任务描述
     */
    private String jobDesc;
    /**
     * 任务执行周期（cron表达式）
     */
    private String jobCron;
    /**
     * 执行状态
     */
    private String execStatus;
    /**
     * 参数
     */
    private String execParam;
    /**
     * 返回结果
     */
    private String execResult;
    /**
     * 开始时间
     */
    private Date beginTime;
    /**
     * 完成时间
     */
    private Date endTime;
    /**
     * 耗时
     */
    private Long costTime;


    public String getLogId() {
        return logId;
    }

    public void setLogId(String logId) {
        this.logId = logId;
    }

    public String getJobId() {
        return jobId;
    }

    public void setJobId(String jobId) {
        this.jobId = jobId;
    }

    public String getJobName() {
        return jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    public String getJobDesc() {
        return jobDesc;
    }

    public void setJobDesc(String jobDesc) {
        this.jobDesc = jobDesc;
    }

    public String getJobCron() {
        return jobCron;
    }

    public void setJobCron(String jobCron) {
        this.jobCron = jobCron;
    }

    public String getExecStatus() {
        return execStatus;
    }

    public void setExecStatus(String execStatus) {
        this.execStatus = execStatus;
    }

    public String getExecParam() {
        return execParam;
    }

    public void setExecParam(String execParam) {
        this.execParam = execParam;
    }

    public String getExecResult() {
        return execResult;
    }

    public void setExecResult(String execResult) {
        this.execResult = execResult;
    }

    public Date getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(Date beginTime) {
        this.beginTime = beginTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Long getCostTime() {
        return costTime;
    }

    public void setCostTime(Long costTime) {
        this.costTime = costTime;
    }

    @Override
    public String toString() {
        return getClass().getName() + JSONObject.toJSONString(this);
    }
}
